%navItemLi {
  align-items: center;
  cursor: pointer;
  display: flex;
  margin-left: var(--space-16);
  white-space: nowrap;

  @media (max-width: 900px) {
    display: flex;
    height: 42px;
    margin-left: 0;

    &:not(:last-child) {
      margin-right: 0.5rem;
    }
  }

  > a {
    line-height: 0;
  }

  &:last-child {
    margin-right: var(--space-08);
  }
}

.header {
  background: var(--color-fill-app);
  border-bottom: var(--space-01) solid var(--black2);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 999;

  .container {
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 var(--space-08) 0 var(--space-24);

    @media (max-width: 900px) {
      align-items: start;
      flex-flow: wrap;
      min-height: calc(1 * var(--nav-height));
      padding: 0 var(--space-12);
    }
  }

  .startWrapper {
    align-items: center;
    display: flex;
    justify-content: flex-start;
  }

  .endWrapper {
    align-items: center;
    display: flex;
    flex-grow: 1;
  }

  .logo {
    @media (max-width: 900px) {
      align-items: center;
      display: flex;
      height: var(--nav-height);
    }

    svg {
      height: var(--space-32);

      @media (max-width: 900px) {
        height: 2.4rem;
      }
    }
  }

  .tabs {
    align-items: center;
    display: flex;
    justify-self: flex-start;
    list-style: none;
    margin: 0 0 0 120px;
    margin-right: auto;

    @media (max-width: 1050px) {
      margin: 0;
    }

    @media (max-width: 900px) {
      background: var(--color-fill-app);
      flex-flow: row wrap;
      justify-content: center;
      order: 3;
      padding: 0;
      width: 100%;
    }

    > li {
      @extend %navItemLi;

      > a {
        color: var(--color-text-primary);
        padding: calc(var(--space-32) + var(--space-04)) var(--space-16);
        text-decoration: none;

        @media (max-width: 900px) {
          padding: var(--space-08);
        }

        &.active {
          border-bottom: var(--space-04) inset var(--color-text-accent);
          color: var(--color-text-accent);
          font-weight: var(--font-weight-semibold);
          margin-bottom: -4px;
        }

        &:hover {
          border-bottom: 4px solid var(--color-text-primary);
          margin-bottom: -4px;
        }
      }
    }
  }

  .right-container {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding-left: 0;

    @media (max-width: 900px) {
      padding: 0;
      width: 100%;
    }

    > li {
      @extend %navItemLi;

      &.search-bar {
        align-items: flex-start;
        flex-grow: 1;
        height: 40px;
        justify-content: flex-end;
        position: relative;

        @media (max-width: 1100px) {
          display: none;
        }
      }
    }
  }
}

:global(.dark) {
  .header {
    border-bottom: 1px solid transparent;
  }
}
